The Code Tracker 1.0 for Microsoft Office Access Add-in records the use of code in all code modules and procedures in the database except for the Forms and Modules that make it work. It records the name of the Procedure, the name of the Module, and the Date and Time.

It works by using one line of code in each procedure.  The code calls the RecordCodeUse sub that records the use of that procedure in the USystblCodeUse table. The code runs very fast and you will most likely not notice any difference in the speed of your database.

IMPORTANT: IF YOU USED THE CODE TRACKER BETA 
This version of the Code Tracker has a button that removes the Code Tracker module, and the two tables from your database. However the Beta Version did not.  So be sure to use the Code Tracker Beta Menu to click the "Delete Tracking Code from All Procedures" button. Then delete the modPAWCodeTracker module. Optionally, you can also delete the USystblCodeUse and the USystblProcedures tables.

--- HOW TO USE THE CODE TRACKER 1.0 ADD-IN IN YOUR DATABASES ---

1) MAKE A BACKUP OF YOUR DATABASE. 
The Code Tracker 1.0 modifies your database and code so you need to have a backup copy. 

2) UNZIP THE DOWNLOADED FILE TO THE FOLDER OF YOUR CHOICE.

3) ADD THE CODE TRACKER 1.0 TO THE ADD-INS MENU IN MICROSOFT ACCESS 2002, 2003, 2007.
In Access 2002-2003 Click Tools > Add-Ins > Add-In Manager.  In Access 2007 click the Database Tools tab then on the Ribbon click Add-ins. The Add-In Manager opens. Click the Add New button and browse to the Code Tracker folder you unzipped. Select the CodeTracker.mda file and click the Open button.  The Code Tracker 1.0 is now installed and will be available to be selected in the Add-in Menu. Click the Close button to exit the Add-Ins Manager.

4) HOW TO START USING THE CODE TRACKER IN A DATABASE.
In Access 2002-2003 Click Tools > Add-Ins then select "Code Tracker".  In Access 2007 click the Datatbase Tools tab. Next on the Ribbon click Add-ins then select "Code Tracker".

This opens the Code Tracker Menu.

The first time you run Code Tracker you need to set up the Code Tracker 1.0 to use in your Database.  See the next step, number 5.

5) HOW TO SETUP THE CODE TRACKER TO USE IN YOUR DATABASE.
Click the "Insert Tracking Code into All Procedures" button to set up Code Tracker to work in a database.  When a dialog appears click "Yes" to save the changes.

Code Tracker 1.0 works by using one line of code in a procedure. That line of code records the use of the procedure and saves the information. When you click the "Insert Tracking Code into All Procedures" button the single line of code is placed in every procedure in your database.

To remove that line of code from all procedures just click the "Remove Tracking Code from All Procedures" button. When a dialog appears click "Yes" to save the changes.

To insert the code in individual procedures see "7) How to Customize Code Tracker Data Collection" on Instructions Page 3.

6) HOW TO VIEW THE CODE USE RECORDS.

A. The Code Use Data Form.
After using your database you can view how your code is being used by clicking the "View Tracked Code Data" button which opens the Code Use Data form. There are many options on the form available to help you to gain knowledge about how your code is being used.  

B. Code Tracker Reports.
To filter and open Reports to view your data click on the "View Tracked Code Data Reports" button on the Code Tracker Menu.  A number of Reports are available that can be filtered in several ways such as by date, by order of Procedure use, or by selected Procedures and Modules.

C. Create Your Own Reports or Forms.
Because the Code Tracker tables are placed in your database you can create your own Forms and Reports to display the Code Use information to meet your needs. The USystblCodeUsePAW table contains the records of code use and the USystblProceduresPAW table contains a list of all Procecures and Modules in the Database. These two tables together enable you to view both used Procedures and Modules but also to list those that have not been used.

7) HOW TO CUSTOMIZE CODE TRACKER DATA COLLECTION.
The Code Tracker 1.0 works by using one line of code in a procedure. The code calls a procedure to record the use of the procedure and module and saves the information in the USystblCodeUsePAW table.

To insert the one line of code into all procedures in the database click the "Insert Tracking Code into All Procedures" button.  The code loops through each module in the database and inserts one line of code into procedures. When a dialog appears click "Yes" to save the changes.

This line of code can be removed by clicking the "Remove Tracking Code from All Procedures" button. When a dialog appears click "Yes" to save the changes.

You can insert the code into individual procedures instead of the entire database.  Just add the code to a procedure as in this example:
    Call RecordCodeUsePAW("YourProcedureName", "YourModuleName", Now())

Or you can use MZ-Tools to add the line of Code.  Just add the following line to the MZ-Tools error handler or a Code Template: 
    Call RecordCodeUsePAW("{PROCEDURE_NAME}", "{MODULE_NAME}", Now())


8) HOW TO REMOVE ALL CODE TRACKER CODE, MODULES, AND TABLES FROM YOUR DATABASE.
Click the "Delete Code Tracker Items in Database" on the Code Tracker Menu.

-------------
We are glad to provide this Add-in for you to use without cost. In return we ask that you report any problems or feature suggestions so I can make the Add-in work well for everyone.  Please send me an email at: patwood@gainingaccess.net






